# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname='perl-text-csv'
_dist="Text-CSV"
pkgver=1.95
pkgrel=4
pkgdesc="comma-separated values manipulator"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
url="https://metacpan.org/release/Text-CSV"
source=("https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/${_dist}-${pkgver}.tar.gz")
md5sums=('1e076b4b1f8ba6a5003bf93f3c437a9e')
sha512sums=('447d38c9f6058251b9c3b1e42bffdec80ffe9ea7f232552921477d3c0dc1e913fe2a1cf1d4cec1410fab92a7e4e59601f429e11a005051710cd2b8d3b77201f9')

unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT

build() {
    cd $_dist-$pkgver
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd $_dist-$pkgver
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd $_dist-$pkgver
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
